#include "qtc_alarm_core/JsonUtil.h"
#include <QDateTime>

namespace qtc_alarm_core {

QString JsonUtil::toIso8601(qint64 epoch_ms) {
  return QDateTime::fromMSecsSinceEpoch(epoch_ms, Qt::UTC).toString(Qt::ISODateWithMs);
}

qint64 JsonUtil::nowEpochMs() {
  return QDateTime::currentDateTimeUtc().toMSecsSinceEpoch();
}

}
